package com.gopay.common.domain.cps;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Version;

/**
 * @CpsBtCheckInInfo.java
 * @author MA HUAN
 * @2013-8-20 下午12:17:33  www.gopay.com.cn Inc.All rights reserved.
 */
@Entity
@Table(name = "CPS_BT_CHECK_IN_INFO")
public class CpsBtCheckInInfo implements java.io.Serializable {
    private static final long serialVersionUID = -7117802943858626460L;

    /**
     * 登记流水号
     */
    private int checkInSq;

    /**
     * 交易市场客户ID
     */
    private String marketCustId;

    /**
     * 交易市场账户
     */
    private String markerAcct;

    /**
     * 登记状态 1 - 已签到 2 - 已签退
     */
    private int checkInStatus;

    /**
     * 乐观锁版本号
     */
    private int version;

    /**
     * 创建时间
     */
    private Date createdTs;

    /**
     * 记录最后修改时间
     */
    private Date lastUpdTs;

    /**
     * 最后修改交易码
     */
    private String lastUpdTranCode;

    @Id
    @SequenceGenerator(name = "CpsBtContractInfoSequence", sequenceName = "CPS_BT_CONTRACT_INFO_SEQ")
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "CpsBtContractInfoSequence")
    @Column(name = "CHECK_IN_SQ", unique = true, nullable = false)
    public int getCheckInSq() {
        return checkInSq;
    }

    public void setCheckInSq(int checkInSq) {
        this.checkInSq = checkInSq;
    }

    @Column(name = "MARKET_CUST_ID", nullable = false, length = 10)
    public String getMarketCustId() {
        return marketCustId;
    }

    public void setMarketCustId(String marketCustId) {
        this.marketCustId = marketCustId;
    }

    @Column(name = "MARKET_ACCT", nullable = false, length = 19)
    public String getMarkerAcct() {
        return markerAcct;
    }

    public void setMarkerAcct(String markerAcct) {
        this.markerAcct = markerAcct;
    }

    @Column(name = "CHECK_IN_STATUS", nullable = false, length = 1)
    public int getCheckInStatus() {
        return checkInStatus;
    }

    public void setCheckInStatus(int checkInStatus) {
        this.checkInStatus = checkInStatus;
    }

    @Version
    @Column(name = "VERSION", precision = 22, scale = 0)
    public int getVersion() {
        return version;
    }

    public void setVersion(int version) {
        this.version = version;
    }

    @Column(name = "CREATED_TS")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getCreatedTs() {
        return createdTs;
    }

    public void setCreatedTs(Date createdTs) {
        this.createdTs = createdTs;
    }

    @Column(name = "LAST_UPD_TS")
    @Temporal(TemporalType.TIMESTAMP)
    public Date getLastUpdTs() {
        return lastUpdTs;
    }

    public void setLastUpdTs(Date lastUpdTs) {
        this.lastUpdTs = lastUpdTs;
    }

    @Column(name = "LAST_UPD_TRANCODE", length = 10)
    public String getLastUpdTranCode() {
        return lastUpdTranCode;
    }

    public void setLastUpdTranCode(String lastUpdTranCode) {
        this.lastUpdTranCode = lastUpdTranCode;
    }

}
